/*
 *  Created on: May 18, 2009
 *      Author: Ramesh Rajaby
 */

#include "../Shared.h"

namespace SymphonyBC {


int getPrimitiveSupertype(int p1, int p2) {
	if (max(Types::getSize(p1), Types::getSize(p2)) <= 4) {
		if (p1 == Types::FLOAT || p2 == Types::FLOAT)
			return Types::FLOAT;
		else
			return Types::INT;
	} else {
		if (p1 == Types::FLOAT || p2 == Types::FLOAT ||
			p1 == Types::DOUBLE || p2 == Types::DOUBLE)
			return Types::DOUBLE;
		else
			return Types::LONG;
	}
}


}
